package entity;

import java.util.Map;

public class Student {
    private static final long serialVersionUID = -2673637313342809713L;

    private int id;
    private String stuName;
    private int age;
    private int gender;
    private String address;

    public Student() {
        super();
    }
    //注意此处有个以map为参数的构造函数
    public Student(Map<String, Object> map) {
        this.id = (Integer)map.get("id");
        this.stuName = (String)map.get("stu_name");
        this.age = (Integer)map.get("age");
        this.gender = (Integer)map.get("gender");
        this.address = (String)map.get("address");
    }
    public Student(int id, String stuName, int age, int gender, String address) {
        super();
        this.id = id;
        this.stuName = stuName;
        this.age = age;
        this.gender = gender;
        this.address = address;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public String getStuName() {
        return stuName;
    }
    public void setStuName(String stuName) {
        this.stuName = stuName;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public int getGender() {
        return gender;
    }
    public void setGender(int gender) {
        this.gender = gender;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    public static long getSerialversionuid() {
        return serialVersionUID;
    }
    @Override
    public String toString() {
        return "Student [id=" + id + ", stuName=" + stuName + ", age=" + age
                + ", gender=" + gender + ", address=" + address + "]";
    }
}
